package com.hmsm.sys.action;


import java.io.ByteArrayInputStream;

import com.hmsm.server.base.BaseAction;
import com.hmsm.server.util.RandomNumUtil;

public class RandomAction extends BaseAction{ 
	
	/**
	 * @since Ver 1.1
	 */
	
	private static final long serialVersionUID = -1651037858317903522L;
	private ByteArrayInputStream inputStream; 
	private String par;
	public void setInputStream(ByteArrayInputStream inputStream) {   
        this.inputStream = inputStream;   
    }   
    public ByteArrayInputStream getInputStream() {   
        return inputStream;   
    }
    
    
	public String getPar() {
		return par;
	}
	public void setPar(String par) {
		this.par = par;
	}
	public String execute() throws Exception{   
        RandomNumUtil rdnu=RandomNumUtil.Instance();   
        this.setInputStream(rdnu.getImage());//取得带有随机字符串的图片   
        this.getRequest().getSession().setAttribute("random", rdnu.getString());//取得随机字符串放入HttpSession
        return SUCCESS;   
    }   
    
}
